package gatech.cs2340.adventuretime.servlets;
import java.awt.EventQueue;

import javax.swing.JFrame;
import java.awt.FlowLayout;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.Color;


public class LoginScreen {

	private JFrame frame;
	private JTextField textField;
	private JTextField textField_1;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					LoginScreen window = new LoginScreen();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public LoginScreen() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setBounds(100, 100, 450, 420);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		
		JLabel lblUsername = new JLabel("Username:");
		lblUsername.setBounds(91, 84, 66, 16);
		frame.getContentPane().add(lblUsername);
		
		JLabel lblPassword = new JLabel("Password:");
		lblPassword.setBounds(91, 124, 66, 16);
		frame.getContentPane().add(lblPassword);
		
		textField = new JTextField();
		textField.setBounds(177, 78, 134, 28);
		frame.getContentPane().add(textField);
		textField.setColumns(10);
		
		textField_1 = new JTextField();
		textField_1.setBounds(177, 118, 134, 28);
		frame.getContentPane().add(textField_1);
		textField_1.setColumns(10);
		
		JLabel lblPleaseLogIn = new JLabel("Please log in below.");
		lblPleaseLogIn.setBounds(152, 34, 124, 16);
		frame.getContentPane().add(lblPleaseLogIn);
		
		JButton btnLogin = new JButton("Login");
		btnLogin.setBounds(159, 170, 117, 29);
		frame.getContentPane().add(btnLogin);
		
		JLabel lblErrorFailedLogin = new JLabel("Error: failed login. Please try again.");
		lblErrorFailedLogin.setForeground(Color.RED);
		lblErrorFailedLogin.setBounds(114, 224, 219, 16);
		frame.getContentPane().add(lblErrorFailedLogin);
	}
}
